import $http from '@/http'

//获取字典值
export const dicData = (success) => $http.get('/admin-api/system/dict-data/simple-list', success)

//获取初始化事项申请材料
export const queryApplyMaterialInfoList = (data, success) => $http.get('/admin-api/bus/apply-material/queryApplyMaterialInfoList', data, success)


//管理端——获得客运业户信息分页
export const ptEnterpriseInfoPage = (data, success) => $http.get('/admin-api/bus/pt-enterprise-info/page', data, success)
//获得客运业户信息[详情]
export const ptEnterpriseInfoGet = (id, success) => $http.get('/admin-api/bus/pt-enterprise-info/get?id=' + id, success)


//获得包车信息查询列表
export const charterSignInfoPage = (data, success) => $http.get('/admin-api/trip/charter-sign-info/page', data, success)
//获得客运业户信息[详情]
export const charterSignInfoGet = (id, success) => $http.get('/admin-api/trip/charter-sign-info/get?id=' + id, success)
//获得我的待办分页(包车审核列表)
export const charterSignInfoTodoPage = (data, success) => $http.get('/admin-api/trip/charter-sign-info/todo-page', data, success)
//获得我的待办分页
export const charterSignInfoTodoGet = (id, success) => $http.get('/admin-api/trip/charter-sign-info/todo-get?id=' + id, success)


export const approveTask = (data, success) => $http.put('/admin-api/bpm/task/approve', data, success)

export const rejectTask = (data, success) => $http.put('/admin-api/bpm/task/reject', data, success)
export const returnTask = (data, success) => $http.put('/admin-api/bpm/task/return', data, success)
// 获取所有可回退的节点
export const getTaskListByReturn = (data, success) => $http.get('/admin-api/bpm/task/list-by-return', data, success)

//获得客运车辆信息分页
export const ptVehicleInfoPage = (data, success) => $http.get('/admin-api/bus/pt-vehicle-info/page', data, success)
export const ptVehicleInfoGet = (id, success) => $http.get('/admin-api/bus/pt-vehicle-info/get?id=' + id, success)


//获得客运从业人员信息分页
export const ptpPractitionerInfoPage = (data, success) => $http.get('/admin-api/bus/pt-practitioner-info/page', data, success)
export const ptpPractitionerInfoGet = (id, personType, success) => $http.get('/admin-api/bus/pt-practitioner-info/get?id=' + id + '&personType=' + personType, success)
